Why might I be encountering an undefined reference error when compiling my C program